using System;
using System.Collections.Generic;
using System.Text;
using Web.Core.Providers;
using System.Collections;

namespace Web.Core.Objects
{
    public class Reviews
    {
        public static Review GetReviewsByID(int reviewID)
        {
            return DataProvider.GetInstance().GetReviewsByID(reviewID);
        }
        public static ArrayList GetReviews(int product_id)
        {
            return DataProvider.GetInstance().GetReviews(product_id);
        }
        public static ArrayList GetReviews(int productID, int pageNumber, int pageSize)
        {
            return DataProvider.GetInstance().GetReviews(productID,pageNumber,pageSize);
        }
        public static int InsertReview(Review rev)
        {
            return DataProvider.GetInstance().CreateUpdateDeleteReview(rev, GlobalStorage.Action.Insert);
        }

        public static int DeleteReview(Review rev)
        {
            return DataProvider.GetInstance().CreateUpdateDeleteReview(rev, GlobalStorage.Action.Delete);
        }

        public static int UpdateReview(Review rev)
        {
            return DataProvider.GetInstance().CreateUpdateDeleteReview(rev, GlobalStorage.Action.Update);
        }
    }
}
